<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>AI Chat Interface</title>
    <style>
      body {
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
        background-color: #f4f4f4;
      }

      .chat-container {
        width: 400px;
        max-height: 600px;
        background-color: #fff;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        border-radius: 8px;
        display: flex;
        flex-direction: column;
      }

      .chat-header {
        padding: 10px;
        background-color: #007bff;
        color: #fff;
        text-align: center;
        font-size: 18px;
        font-weight: bold;
        border-radius: 8px 8px 0 0;
      }

      .chat-messages {
        flex: 1;
        padding: 10px;
        overflow-y: auto;
      }

      .chat-message {
        margin-bottom: 10px;
      }

      .user-message {
        text-align: right;
        color: #007bff;
      }

      .ai-message {
        text-align: left;
        color: #333;
      }

      .chat-input {
        display: flex;
        padding: 10px;
        border-top: 1px solid #ddd;
        background-color: #f9f9f9;
        border-radius: 0 0 8px 8px;
      }

      .chat-input input {
        flex: 1;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 16px;
      }

      .chat-input button {
        margin-left: 10px;
        padding: 10px 20px;
        background-color: #007bff;
        color: #fff;
        border: none;
        border-radius: 4px;
        font-size: 16px;
        cursor: pointer;
      }

      .chat-input button:hover {
        background-color: #0056b3;
      }
    </style>
  </head>
  <body>
    <div class="chat-container">
      <div class="chat-header">AI Chat</div>
      <div class="chat-messages" id="chat-messages"></div>
      <div class="chat-input">
        <input type="text" id="user-input" placeholder="Type your message..." />
        <button onclick="sendMessage()">Send</button>
      </div>
    </div>
    <script src="chat.js"></script>
  </body>
</html>
